<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div th:replace="~{include-head :: head}"></div>
<body>

<!--引入nav-->
<div th:replace="~{include-nav :: nav}"></div>
<div class="container-fluid">
    <div class="row">
        <!--引入sidebar-->
        <div th:replace="~{include-sidebar :: sidebar}"></div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <ol class="breadcrumb">
                <li><a th:href="@{/admin/to/main/page.html}">首页</a></li>
                <li><a th:href="@{/admin/query/for/search}">数据列表</a></li>
                <li class="active">修改</li>
            </ol>
            <div class="panel panel-default">
                <div class="panel-heading">表单数据<div style="float:right;cursor:pointer;" data-toggle="modal" data-target="#myModal"><i class="glyphicon glyphicon-question-sign"></i></div></div>
                <div class="panel-body">
                    <form role="form" th:action="@{/admin/update}" method="post">
<!--                        把分页id传过来-->
                       <input type="hidden" name="pageNum" th:value="${param.get('pageNum') }" />
<!--                            把用户id传过来-->
                        <input type="hidden" name="id" th:value="${#request.getAttribute('ADMIN').id}" />
                        <div class="form-group">
                            <label for="loginacct">登陆账号</label>
<!--                            th:value回显数据-->
                            <input th:value="${#request.getAttribute('ADMIN').loginacct}" type="text" name="loginacct" class="form-control" id="loginacct"placeholder="请输入登陆账号">
                        </div>
                        <div class="form-group">
                            <label for="userpswd">登陆密码</label>
                            <input type="password" name="userpswd" class="form-control" id="userpswd" placeholder="请输入登陆密码"/>
                        </div>
                        <div class="form-group">
                            <label for="username">用户昵称</label>
                            <input th:value="${#request.getAttribute('ADMIN').username}" type="text" name="username" class="form-control" id="username" placeholder="请输入用户昵称"/>
                        </div>
                        <div class="form-group">
                            <label for="email">邮箱地址</label>
                            <input th:value="${#request.getAttribute('ADMIN').email}" type="email" name="email" class="form-control" id="email" placeholder="请输入邮箱地址">
                            <p class="help-block label label-warning">请输入合法的邮箱地址, 格式为： xxxx@xxxx.com</p>
                        </div>
                        <button type="submit" class="btn btn-success"><i class="glyphicon glyphicon-plus"></i> 修改</button>
                        <button type="button" class="btn btn-danger"><i class="glyphicon glyphicon-refresh"></i> 重置</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
</div>
</body>
</html>
